//
//  MainViewController.m
//  WeiBo(OC)
//
//  Created by Xmen on 16/9/20.
//  Copyright © 2016年 111. All rights reserved.
//

#import "MainViewController.h"

@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}


- (void)addChildViewController:(UIViewController *)childController title:(NSString *)title andImageName:(NSString *)imageNama{
    
    childController.tabBarItem.image = [[UIImage imageNamed:imageNama]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [childController.tabBarItem setTitleTextAttributes:[UIFont systemFontOfSize:14] forState:0];
//    [childController.tabBarItem setTitleTextAttributes:[[NSForegroundColorAttributeName [UIColor redColor] ] forState:1];
    childController.title = title;
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:childController];
    [self addChildViewController:nav];
    
}

@end

